package com.monitorchart;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.TextView;

public class MainActivity extends Activity implements OnClickListener
{
	/**
	 * 系统监控
	 */
	private TextView systemMonitor;
	
	/**
	 * 业务监控
	 */
	private TextView businessMonitor;
	
	/**
	 * 主机监控
	 */
	private TextView mainPro;
	
	/**
	 * 系统配置
	 */
	private TextView systemConfig;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_main);
		
		systemMonitor = (TextView) findViewById(R.id.systemMonitor);
		businessMonitor = (TextView) findViewById(R.id.businessMonitor);
		mainPro = (TextView) findViewById(R.id.mainPro);
		systemConfig = (TextView) findViewById(R.id.systemConfig);
		
		systemMonitor.setOnClickListener(this);
		businessMonitor.setOnClickListener(this);
		mainPro.setOnClickListener(this);
		systemConfig.setOnClickListener(this);
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu)
	{
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	@Override
	public void onClick(View v)
	{
		Intent mIntent = new Intent();
		switch (v.getId())
		{
			case R.id.systemMonitor:
				mIntent.setClass(this, SysMonitorActivity.class);
				startActivity(mIntent);
				break;
			case R.id.businessMonitor:
				mIntent.setClass(this, BusinessMonitorActivity.class);
				startActivity(mIntent);
				break;
			case R.id.mainPro:
				
				break;
			case R.id.systemConfig:
				
				break;
		}
	}
}
